path=r'F:\代码\代码\python\bilibili\aa.txt'
stream=open(path,'w',encoding='utf-8')

s=  '''
   你好，机灵鬼
          赌王
    '''
stream.write(s)
stream.write('龙五')
stream.close()

#覆盖了源文件（把文件先清再写）